var http = require('http');
var fs = require('fs');
var server = http.createServer();
server.on('request', function(request, response) {
    response.setHeader('Access-Control-Allow-Origin', '*');

    response.writeHead(200, {
        'Content-Type': 'text/plain;charset=utf-8'
    });
    fs.readFile('product.json', function(err, data) {
        response.end(data);
    });
});
server.listen(3000, function(err) {
    console.log('listening port 3000...');
});